package com.gitee.wsl.concurrent.executor

import com.gitee.wsl.concurrent.api.disposable.Disposable
import kotlinx.coroutines.Runnable


/**
 * An interface for executing tasks asynchronously.
 * Implementations of this interface provide a way to execute tasks in a separate thread or thread pool.
 */
interface Executor : Disposable {
    /**
     * Submits a task for execution.
     * The task will be executed at some point in the future, depending on the implementation.
     *
     * @param task The function to be executed.
     */
    fun exec(runnable: Runnable)

    //fun queue(runnable: Runnable) = exec(runnable)

    companion object

}



